#!/bin/bash

home=$(cd $(dirname $0); pwd)
cd $home

pid=$($home/status.sh)
if [ "$pid" == "" ]; then
  echo error: the server not started.
  exit -1
fi

echo "$pid $(date)" >> $home/pid.stopped
echo $pid
kill -9 $pid
